package org.dromara.setting.domain.bo;

import org.dromara.setting.domain.SettingConfigItem;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 配置项业务对象 setting_config_item
 *
 * @author LXK-RY5
 * @date 2024-08-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SettingConfigItem.class, reverseConvertGenerate = false)
public class SettingConfigItemBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 配置名称
     */
    @NotBlank(message = "配置名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 配置KEY
     */
    @NotBlank(message = "配置KEY不能为空", groups = { AddGroup.class, EditGroup.class })
    private String key;

    /**
     * 配置值
     */
    @NotBlank(message = "配置值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String value;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sortNum;

    /**
     * 备注
     */
    private String remark;

    /**
     * 值输入类型，input=输入框 image_upload=上传图片
     */
    @NotBlank(message = "值输入类型，input=输入框 image_upload=上传图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String valueInputType;

    /**
     * 配置组
     */
    @NotNull(message = "配置组不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long configGroupId;


}
